package com.kddi.market.alml.lib;

import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.Handler;
import com.kddi.market.alml.service.IAppAuthorizeService;
import com.kddi.market.alml.service.IAppAuthorizeServiceCallback;
import java.util.Map;

public class ALMLClient extends ALMLClientBase {
    /* access modifiers changed from: private */

    /* renamed from: c  reason: collision with root package name */
    public static IALMLClientCallback f2684c;
    /* access modifiers changed from: private */

    /* renamed from: d  reason: collision with root package name */
    public static IMonthlyAccountCallback f2685d;
    /* access modifiers changed from: private */
    public static IItemReceiptCallback e;
    /* access modifiers changed from: private */
    public static IEZNumberCallback f;
    /* access modifiers changed from: private */
    public static ITokenCallback g;
    /* access modifiers changed from: private */
    public static final Object h = new Object();
    /* access modifiers changed from: private */

    /* renamed from: a  reason: collision with root package name */
    public IAppAuthorizeService f2686a;
    /* access modifiers changed from: private */

    /* renamed from: b  reason: collision with root package name */
    public CONNECTION_STATUS f2687b;

    protected class AuthServiceConnection implements ServiceConnection {

        /* renamed from: a  reason: collision with root package name */
        private ExecuteCallback f2688a;

        /* renamed from: b  reason: collision with root package name */
        final /* synthetic */ ALMLClient f2689b;

        /* JADX WARNING: Code restructure failed: missing block: B:15:0x0042, code lost:
            return;
         */
        /* Code decompiled incorrectly, please refer to instructions dump. */
        public void onServiceConnected(android.content.ComponentName r3, android.os.IBinder r4) {
            /*
                r2 = this;
                java.lang.Object r3 = com.kddi.market.alml.lib.ALMLClient.h
                monitor-enter(r3)
                com.kddi.market.alml.lib.ALMLClient r0 = r2.f2689b     // Catch:{ all -> 0x0043 }
                com.kddi.market.alml.lib.ALMLClient$CONNECTION_STATUS r1 = com.kddi.market.alml.lib.ALMLClient.CONNECTION_STATUS.CONNECTING     // Catch:{ all -> 0x0043 }
                r0.f2687b = r1     // Catch:{ all -> 0x0043 }
                com.kddi.market.alml.lib.ALMLClient r0 = r2.f2689b     // Catch:{ all -> 0x0043 }
                com.kddi.market.alml.service.IAppAuthorizeService r4 = com.kddi.market.alml.service.IAppAuthorizeService.Stub.x0(r4)     // Catch:{ all -> 0x0043 }
                r0.f2686a = r4     // Catch:{ all -> 0x0043 }
                com.kddi.market.alml.lib.ALMLClient r4 = r2.f2689b     // Catch:{ all -> 0x0043 }
                com.kddi.market.alml.service.IAppAuthorizeService r4 = r4.f2686a     // Catch:{ all -> 0x0043 }
                if (r4 != 0) goto L_0x0031
                com.kddi.market.alml.lib.ALMLClient$ExecuteCallback r4 = r2.f2688a     // Catch:{ all -> 0x0043 }
                if (r4 == 0) goto L_0x0028
                com.kddi.market.alml.lib.ALMLClient$ExecuteCallback r4 = r2.f2688a     // Catch:{ all -> 0x0043 }
                r0 = -99
                r4.b(r0)     // Catch:{ all -> 0x0043 }
            L_0x0028:
                com.kddi.market.alml.lib.ALMLClient r4 = r2.f2689b     // Catch:{ all -> 0x0043 }
                com.kddi.market.alml.lib.ALMLClient$CONNECTION_STATUS r0 = com.kddi.market.alml.lib.ALMLClient.CONNECTION_STATUS.DISCONNECT     // Catch:{ all -> 0x0043 }
                r4.f2687b = r0     // Catch:{ all -> 0x0043 }
                monitor-exit(r3)     // Catch:{ all -> 0x0043 }
                return
            L_0x0031:
                com.kddi.market.alml.lib.ALMLClient r4 = r2.f2689b     // Catch:{ all -> 0x0043 }
                com.kddi.market.alml.lib.ALMLClient$CONNECTION_STATUS r0 = com.kddi.market.alml.lib.ALMLClient.CONNECTION_STATUS.CONNECTED     // Catch:{ all -> 0x0043 }
                r4.f2687b = r0     // Catch:{ all -> 0x0043 }
                com.kddi.market.alml.lib.ALMLClient$ExecuteCallback r4 = r2.f2688a     // Catch:{ all -> 0x0043 }
                if (r4 == 0) goto L_0x0041
                com.kddi.market.alml.lib.ALMLClient$ExecuteCallback r4 = r2.f2688a     // Catch:{ all -> 0x0043 }
                r4.a()     // Catch:{ all -> 0x0043 }
            L_0x0041:
                monitor-exit(r3)     // Catch:{ all -> 0x0043 }
                return
            L_0x0043:
                r4 = move-exception
                monitor-exit(r3)     // Catch:{ all -> 0x0043 }
                throw r4
            */
            throw new UnsupportedOperationException("Method not decompiled: com.kddi.market.alml.lib.ALMLClient.AuthServiceConnection.onServiceConnected(android.content.ComponentName, android.os.IBinder):void");
        }

        public void onServiceDisconnected(ComponentName componentName) {
            ExecuteCallback executeCallback = this.f2688a;
            if (executeCallback != null) {
                executeCallback.b(-98);
            }
            this.f2689b.f2686a = null;
            this.f2689b.f2687b = CONNECTION_STATUS.DISCONNECT;
        }
    }

    public enum CONNECTION_STATUS {
        DISCONNECT,
        CONNECTING,
        CONNECTED
    }

    protected interface ExecuteCallback {
        void a();

        void b(int i);
    }

    public interface IALMLClientCallback {
        void n(int i, String str, String str2, Map<String, Object> map);
    }

    public interface IAuOneOtherTokenCallback {
    }

    public interface IAuOtherTokenCallback {
    }

    public interface IAuTokenCallback {
    }

    public interface IEZNOTokenCallback {
    }

    public interface IEZNumberCallback {
        void p(int i, String str, Map<String, Object> map);
    }

    public interface IItemReceiptCallback {
        void g(int i, String str, String str2, Map<String, Object> map);

        void k(int i, String str, String str2, Map<String, Object> map);

        void s(int i, String str, String str2, Map<String, Object> map);

        void t(int i, Map<String, Object> map);
    }

    public interface IMonthlyAccountCallback {
        void l(int i, Map<String, Object> map);

        void r(int i, Map<String, Object> map);
    }

    public interface IOpenIDTokenCallback {
    }

    public interface ITokenCallback {
        void m(int i, String str, String str2, Map<String, Object> map);
    }

    public interface ServiceConnectionCallback {
    }

    class a extends IAppAuthorizeServiceCallback.Stub {
        a(ALMLClient aLMLClient) {
        }

        public void g(int i, String str, String str2, Map map) {
            if (ALMLClient.e != null) {
                ALMLClient.e.g(i, str, str2, map);
            }
        }

        public void k(int i, String str, String str2, Map map) {
            if (ALMLClient.e != null) {
                ALMLClient.e.k(i, str, str2, map);
            }
        }

        public void l(int i, Map map) {
            if (ALMLClient.f2685d != null) {
                ALMLClient.f2685d.l(i, map);
            }
        }

        public void m(int i, String str, String str2, Map map) {
            if (ALMLClient.g != null) {
                ALMLClient.g.m(i, str, str2, map);
            }
        }

        public void n(int i, String str, String str2, Map map) {
            if (ALMLClient.f2684c != null) {
                ALMLClient.f2684c.n(i, str, str2, map);
            }
        }

        public void p(int i, String str, Map map) {
            if (ALMLClient.f != null) {
                ALMLClient.f.p(i, str, map);
            }
        }

        public void r(int i, Map map) {
            if (ALMLClient.f2685d != null) {
                ALMLClient.f2685d.r(i, map);
            }
        }

        public void s(int i, String str, String str2, Map map) {
            if (ALMLClient.e != null) {
                ALMLClient.e.s(i, str, str2, map);
            }
        }

        public void u(int i, Map map) {
            if (ALMLClient.e != null) {
                ALMLClient.e.t(i, map);
            }
        }
    }

    public ALMLClient() {
        CONNECTION_STATUS connection_status = CONNECTION_STATUS.DISCONNECT;
        new Handler();
        new a(this);
    }
}
